import request from "@/utils/request";

/** 文书分类表单 */
export interface InsTypeForm {
  id?: number;
  typeName?: string;
  categoryName?: string;
  categoryId?: number;
}
/** 文书分类对象 */
export interface InsTypeVO {
  categoryId?: number;
  createdAt?: string;
  id?: number;
  typeName?: string;
  categoryName?: string;
  updateAt?: string;
}
class insTypeAPI {
  /** 获取分页文书分类列表 */
  static getInstype() {
    return request<any, InsTypeVO[]>({
      url: "/api/ins_type",
      method: "get",
      // data: params,
    });
  }
  /** 新增+修改 文书分类列表 */
  static updateInstype(params: InsTypeForm) {
    return request<any, InsTypeVO[]>({
      url: "/api/ins_type",
      method: "post",
      data: params,
    });
  }
  /** 删除文书分类列表 */
  static deleteInstype(id: string) {
    return request({
      url: `/api/ins_type/${id}`,
      method: "delete",
      // data: params,
    });
  }
}

export default insTypeAPI;
